<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>FlexBox</title>
  <style media="screen">
    html {
      display: flex;
      height: 100%;
    }
    body {
      border: 1px solid green;
      background-color: yellow;
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0;
    }
    .box {
      border: 1px solid red;
      width: 100px;
      height: 100px;
    }
  </style>
</head>
<body>
  <div class="box"></div>
</body>
</html>